package com.example.scala.chapter3

class User(var name:String){
  override def toString : String = this.name

  override def equals(obj : Any) : Boolean = this.name == obj.asInstanceOf[User].name
}
object User{
  def apply(name : String) : User = new User ( name )
}